]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenShield: Tweak curtain animation timings
authorRui Matos <tiagomatos@gmail.com>
Wed, 24 Oct 2012 00:26:20 +0000 (02:26 +0200)
committerRui Matos <tiagomatos@gmail.com>
Fri, 26 Oct 2012 10:56:17 +0000 (12:56 +0200)
Rationale:
 - Getting something out of the way should be quick;

 - Very few things in the real world move linearly so, linear
   animations, especially for something as big and visible as this,
   felt too artificial;

 - Moving the curtain out should start slower to make it feel like
   having weight (it fills the whole screen after all) but quickly
   accelerate towards the end to make it snappy too.

https://bugzilla.gnome.org/show_bug.cgi?id=686745

js/ui/screenShield.js

index a02182d5a284766aaa29fa3b5521424a925d6152..52c7dcc7570f3348e7c634453ddc888a19187fe0 100644 (file)
@@ -26,7 +26,7 @@ const Util = imports.misc.util;
 const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
 const LOCK_ENABLED_KEY = 'lock-enabled';
 
-const CURTAIN_SLIDE_TIME = 0.5;
+const CURTAIN_SLIDE_TIME = 0.3;
 // fraction of screen height the arrow must reach before completing
 // the slide up automatically
 const ARROW_DRAG_THRESHOLD = 0.1;
@@ -47,7 +47,7 @@ const SUMMARY_ICON_SIZE = 48;
 // STANDARD_FADE_TIME is used when the session goes idle, while
 // SHORT_FADE_TIME is used when requesting lock explicitly from the user menu
 const STANDARD_FADE_TIME = 10;
-const SHORT_FADE_TIME = 0.8;
+const SHORT_FADE_TIME = 0.3;
 
 const Clock = new Lang.Class({
     Name: 'ScreenShieldClock',
@@ -526,7 +526,7 @@ const ScreenShield = new Lang.Class({
             Tweener.addTween(this._lockScreenGroup,
                              { y: 0,
                                time: time,
-                               transition: 'linear',
+                               transition: 'easeInQuad',
                                onComplete: function() {
                                    this._lockScreenGroup.fixed_position_set = false;
                                    this._lockScreenState = MessageTray.State.SHOWN;
@@ -622,7 +622,7 @@ const ScreenShield = new Lang.Class({
             Tweener.addTween(this._lockScreenGroup,
                              { y: -h,
                                time: time,
-                               transition: 'linear',
+                               transition: 'easeInQuad',
                                onComplete: function() {
                                    this._lockScreenState = MessageTray.State.HIDDEN;
                                    this._lockScreenGroup.hide();
@@ -683,7 +683,7 @@ const ScreenShield = new Lang.Class({
             Tweener.addTween(this._lockScreenGroup,
                              { y: 0,
                                time: SHORT_FADE_TIME,
-                               transition: 'linear',
+                               transition: 'easeOutQuad',
                                onComplete: function() {
                                    this._lockScreenShown();
                                },